log using "$Rep_smokelabor/2_analysis/output_logs/appendix_table4.log", replace 

	use "$Rep_smokelabor/1_build/regdata/county_year.dta", clear 
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()

	reghdfe ln_irsmove_INexempt 	hms_deep [aw=irs_exempt], a(countyfip fe_divisionyr) vce(cluster countyfip)
	regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table4.dta",  table(in_migration, `tbl_settings_log') replace
	
	reghdfe ln_irsmove_OUTexempt 	hms_deep [aw=irs_exempt], a(countyfip fe_divisionyr) vce(cluster countyfip)
	regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table4.dta",  table(out_migration, `tbl_settings_log') append
	
	reghdfe ln_irs_exempt 			hms_deep , a(countyfip fe_divisionyr) vce(cluster countyfip)
	regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table4.dta",  table(tax_exemptions, `tbl_settings_log') append
	
	preserve 
		use "$Rep_smokelabor/2_analysis/output_tables/appendix_table4.dta", replace
		drop if var == "r2"
		drop if var == "_id"
		drop if strpos(var, "_cons_") > 0
		ingap 3
		list , sep(0)
		saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table4.dta", replace
	restore 
	
log close

